package output;

import java.util.Scanner;

public class MainConsole extends Console {


	
public MainConsole (){
	consoleStr.add("Administration Console;");
	consoleStr.add("Teacher Console;");
	consoleStr.add("Student Console;");
	consoleStr.add("Auditorium Console;");
	consoleStr.add("Currculum Console;");
	consoleStr.add("Exit.");
	
}

@Override	
public void inputInConsole() {
		Scanner scan = new Scanner(System.in);
		int opt;
		while (true) {
				if (scan.hasNextInt()) {
					opt = scan.nextInt();
					if (1 <= opt & opt <= consoleStr.size()) {
						if (opt == 1) {
							new AdmConsole().getConsole();
						}
						if (opt == 2) {
							new TeacherConsole().getConsole();
						}
						if (opt == 3) {
							new StudentConsole().getConsole();
						}
						if (opt == 4) {
							new AuditConsole().getConsole();
						}
						if (opt == 5) {
							new CurrConsole().getConsole();
						}
						if (opt == 6){
							return;
						}
					}else{
					System.out.println("Incorrect point.Please enter option:");
					}
				}else {
					scan.nextLine();
					System.out.println("Input incorrect!Please enter option:");
				}
			
		}
	}

	
}
